package com.veo.service.Imp;

import com.github.pagehelper.PageHelper;
import com.veo.dao.SysLogDao;
import com.veo.domain.SysLog;
import com.veo.service.SyslogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

@Service("sysLogService")
@Transactional
public class SysLogServiceImpl implements SyslogService {

    @Autowired
    private SysLogDao sysLogDao;

    public int saveLog(SysLog log) {
        return sysLogDao.saveLog(log);
    }

    public List<SysLog> finaAllSysLog(int page, int size, String searcherName) {
        //实现分页
        PageHelper.startPage(page,size);
        return sysLogDao.finaAllSysLog(searcherName);
    }

    public int deleteSysLogById(String id) {
        return sysLogDao.deleteSysLogById(id);
    }
}
